package com.design.method.error;

public class SizeError extends Exception {
    public SizeError(int x,int y){
        super("异常的取值范围 :   " + x  + "   " + y);
    }
    public static boolean isOverFlow(int size,int x,int y)  {
        return x >= 0 && y >= 0 && x < size && y < size;
    }
}